package com.rpoonolly.simplegame.worldGrid;

import java.io.Serializable;
import java.util.List;

import com.rpoonolly.simplegame.textures.TextureId;

public final class WorldGridTile implements Serializable{
	private static final long serialVersionUID = 1L;
	
	private final List<TextureId> textures;
	private final GridCoordinate coordinate;
	
	public WorldGridTile(GridCoordinate coordinate, List<TextureId> textures) {
		this.textures = textures;
		this.coordinate = coordinate;
	}
	
	public List<TextureId> getTextures() {
		return textures;
	}
	
	public GridCoordinate getCoordinate() {
		return coordinate;
	}
	
	@Override
	public String toString() {
		String resultString = "coordinate:" + coordinate + "\ntextures:";
		if(textures == null)
			return(resultString);
		
		for(TextureId texture : textures)
			resultString += "\n\ttexture:" + texture;
		return resultString;
	}
}
